package com.train.common.model.page;

import com.train.common.group.QueryGroup;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public abstract class PageParam {

    @NotNull(message = "页码不能为空", groups = QueryGroup.class)
    private Long pageNo;

    @NotNull(message = "每页条数不能为空", groups = QueryGroup.class)
    @Max(value = 100, message = "页码不能超过100", groups = QueryGroup.class)
    private Long pageSize;
}
